﻿Imports SIGI.Common.BE

Public Class UC_Screen_Permission

#Region "<< -Attributes- >>"
    Private _Permission As PermissionBE = Nothing
    Private _Screen As ScreenBE = Nothing
#End Region

#Region "<< -Properties- >>"
    Public Property Permission As PermissionBE
        Get
            Return _Permission
        End Get
        Set(value As PermissionBE)
            _Permission = value
        End Set
    End Property

    Public Property Screen As ScreenBE
        Get
            Return _Screen
        End Get
        Set(value As ScreenBE)
            _Screen = value
        End Set
    End Property
#End Region

#Region "<< -Events- >>"
    Private Sub UC_Screen_Permission_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Try
            If Me.DesignMode Then
                Return
            End If

            If _Permission Is Nothing Or _Screen Is Nothing Then
                Return
            End If

            txtPermission.Text = _Permission.Description
            txtScreen.Text = _Screen.Description
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
#End Region

#Region "<< -Method- >>"
    Public Function Selected() As Boolean
        Return chkSelected.Checked
    End Function
#End Region

End Class
